package com.sora.eduservice.client;

import com.sora.eduservice.client.impl.OrderClientImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Classname: OrderClient
 * @Description:
 * @Author: Stonffe
 * @Date: 2023/1/14 21:04
 */
@Component
@FeignClient(name = "service-order",fallback = OrderClientImpl.class)
public interface OrderClient {
    /**
     * 根据【用户id、课程id】查询订单表中的状态
     * @param memberId
     * @param courseId
     * @return
     */
    @GetMapping("/eduorder/t-order/isBuyCourse/{memberId}/{courseId}")
    Boolean isBuyCourse(@PathVariable("memberId") String memberId, @PathVariable("courseId") String courseId);


}
